// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

pub mod iceberg_catalog_service {
    use crate::Result;

    /// A builder for [IcebergCatalogService][crate::client::IcebergCatalogService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_biglake_v1::*;
    /// # use builder::iceberg_catalog_service::ClientBuilder;
    /// # use client::IcebergCatalogService;
    /// let builder : ClientBuilder = IcebergCatalogService::builder();
    /// let client = builder
    ///     .with_endpoint("https://biglake.googleapis.com")
    ///     .build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub type ClientBuilder =
        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;

    pub(crate) mod client {
        use super::super::super::client::IcebergCatalogService;
        pub struct Factory;
        impl gax::client_builder::internal::ClientFactory for Factory {
            type Client = IcebergCatalogService;
            type Credentials = gaxi::options::Credentials;
            async fn build(
                self,
                config: gaxi::options::ClientConfig,
            ) -> gax::client_builder::Result<Self::Client> {
                Self::Client::new(config).await
            }
        }
    }

    /// Common implementation for [crate::client::IcebergCatalogService] request builders.
    #[derive(Clone, Debug)]
    pub(crate) struct RequestBuilder<R: std::default::Default> {
        stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        request: R,
        options: gax::options::RequestOptions,
    }

    impl<R> RequestBuilder<R>
    where
        R: std::default::Default,
    {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self {
                stub,
                request: R::default(),
                options: gax::options::RequestOptions::default(),
            }
        }
    }

    /// The request builder for [IcebergCatalogService::get_iceberg_catalog_config][crate::client::IcebergCatalogService::get_iceberg_catalog_config] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::GetIcebergCatalogConfig;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetIcebergCatalogConfig {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetIcebergCatalogConfig(
        RequestBuilder<crate::model::GetIcebergCatalogConfigRequest>,
    );

    impl GetIcebergCatalogConfig {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetIcebergCatalogConfigRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::IcebergCatalogConfig> {
            (*self.0.stub)
                .get_iceberg_catalog_config(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [warehouse][crate::model::GetIcebergCatalogConfigRequest::warehouse].
        ///
        /// This is a **required** field for requests.
        pub fn set_warehouse<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.warehouse = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetIcebergCatalogConfig {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::list_iceberg_namespaces][crate::client::IcebergCatalogService::list_iceberg_namespaces] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::ListIcebergNamespaces;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListIcebergNamespaces {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListIcebergNamespaces(RequestBuilder<crate::model::ListIcebergNamespacesRequest>);

    impl ListIcebergNamespaces {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListIcebergNamespacesRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListIcebergNamespacesResponse> {
            (*self.0.stub)
                .list_iceberg_namespaces(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [page_token][crate::model::ListIcebergNamespacesRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListIcebergNamespacesRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [api_parent][crate::model::ListIcebergNamespacesRequest::api_parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_api_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.api_parent = v.into();
            self
        }

        /// Sets the value of [parent][crate::model::ListIcebergNamespacesRequest::parent].
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListIcebergNamespaces {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::get_iceberg_namespace][crate::client::IcebergCatalogService::get_iceberg_namespace] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::GetIcebergNamespace;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetIcebergNamespace {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetIcebergNamespace(RequestBuilder<crate::model::GetIcebergNamespaceRequest>);

    impl GetIcebergNamespace {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetIcebergNamespaceRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::IcebergNamespace> {
            (*self.0.stub)
                .get_iceberg_namespace(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetIcebergNamespaceRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetIcebergNamespace {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::create_iceberg_namespace][crate::client::IcebergCatalogService::create_iceberg_namespace] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::CreateIcebergNamespace;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> CreateIcebergNamespace {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct CreateIcebergNamespace(RequestBuilder<crate::model::CreateIcebergNamespaceRequest>);

    impl CreateIcebergNamespace {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::CreateIcebergNamespaceRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::IcebergNamespace> {
            (*self.0.stub)
                .create_iceberg_namespace(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::CreateIcebergNamespaceRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [iceberg_namespace][crate::model::CreateIcebergNamespaceRequest::iceberg_namespace].
        ///
        /// This is a **required** field for requests.
        pub fn set_iceberg_namespace<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::IcebergNamespace>,
        {
            self.0.request.iceberg_namespace = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [iceberg_namespace][crate::model::CreateIcebergNamespaceRequest::iceberg_namespace].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_iceberg_namespace<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::IcebergNamespace>,
        {
            self.0.request.iceberg_namespace = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for CreateIcebergNamespace {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::delete_iceberg_namespace][crate::client::IcebergCatalogService::delete_iceberg_namespace] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::DeleteIcebergNamespace;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteIcebergNamespace {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteIcebergNamespace(RequestBuilder<crate::model::DeleteIcebergNamespaceRequest>);

    impl DeleteIcebergNamespace {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteIcebergNamespaceRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_iceberg_namespace(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteIcebergNamespaceRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteIcebergNamespace {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::update_iceberg_namespace][crate::client::IcebergCatalogService::update_iceberg_namespace] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::UpdateIcebergNamespace;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> UpdateIcebergNamespace {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct UpdateIcebergNamespace(RequestBuilder<crate::model::UpdateIcebergNamespaceRequest>);

    impl UpdateIcebergNamespace {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::UpdateIcebergNamespaceRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::UpdateIcebergNamespaceResponse> {
            (*self.0.stub)
                .update_iceberg_namespace(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::UpdateIcebergNamespaceRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [iceberg_namespace_update][crate::model::UpdateIcebergNamespaceRequest::iceberg_namespace_update].
        ///
        /// This is a **required** field for requests.
        pub fn set_iceberg_namespace_update<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::IcebergNamespaceUpdate>,
        {
            self.0.request.iceberg_namespace_update = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [iceberg_namespace_update][crate::model::UpdateIcebergNamespaceRequest::iceberg_namespace_update].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_iceberg_namespace_update<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::IcebergNamespaceUpdate>,
        {
            self.0.request.iceberg_namespace_update = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for UpdateIcebergNamespace {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::list_iceberg_table_identifiers][crate::client::IcebergCatalogService::list_iceberg_table_identifiers] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::ListIcebergTableIdentifiers;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListIcebergTableIdentifiers {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListIcebergTableIdentifiers(
        RequestBuilder<crate::model::ListIcebergTableIdentifiersRequest>,
    );

    impl ListIcebergTableIdentifiers {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListIcebergTableIdentifiersRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListIcebergTableIdentifiersResponse> {
            (*self.0.stub)
                .list_iceberg_table_identifiers(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [page_token][crate::model::ListIcebergTableIdentifiersRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListIcebergTableIdentifiersRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [parent][crate::model::ListIcebergTableIdentifiersRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListIcebergTableIdentifiers {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::create_iceberg_table][crate::client::IcebergCatalogService::create_iceberg_table] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::CreateIcebergTable;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> CreateIcebergTable {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct CreateIcebergTable(RequestBuilder<crate::model::CreateIcebergTableRequest>);

    impl CreateIcebergTable {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::CreateIcebergTableRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<api::model::HttpBody> {
            (*self.0.stub)
                .create_iceberg_table(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::CreateIcebergTableRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [http_body][crate::model::CreateIcebergTableRequest::http_body].
        ///
        /// This is a **required** field for requests.
        pub fn set_http_body<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<api::model::HttpBody>,
        {
            self.0.request.http_body = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [http_body][crate::model::CreateIcebergTableRequest::http_body].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_http_body<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<api::model::HttpBody>,
        {
            self.0.request.http_body = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for CreateIcebergTable {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::delete_iceberg_table][crate::client::IcebergCatalogService::delete_iceberg_table] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::DeleteIcebergTable;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteIcebergTable {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteIcebergTable(RequestBuilder<crate::model::DeleteIcebergTableRequest>);

    impl DeleteIcebergTable {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteIcebergTableRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_iceberg_table(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteIcebergTableRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [purge_requested][crate::model::DeleteIcebergTableRequest::purge_requested].
        pub fn set_purge_requested<T: Into<bool>>(mut self, v: T) -> Self {
            self.0.request.purge_requested = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteIcebergTable {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::get_iceberg_table][crate::client::IcebergCatalogService::get_iceberg_table] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::GetIcebergTable;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetIcebergTable {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetIcebergTable(RequestBuilder<crate::model::GetIcebergTableRequest>);

    impl GetIcebergTable {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetIcebergTableRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<api::model::HttpBody> {
            (*self.0.stub)
                .get_iceberg_table(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetIcebergTableRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [snapshots][crate::model::GetIcebergTableRequest::snapshots].
        pub fn set_snapshots<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.snapshots = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetIcebergTable {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::load_iceberg_table_credentials][crate::client::IcebergCatalogService::load_iceberg_table_credentials] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::LoadIcebergTableCredentials;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> LoadIcebergTableCredentials {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct LoadIcebergTableCredentials(RequestBuilder<crate::model::GetIcebergTableRequest>);

    impl LoadIcebergTableCredentials {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetIcebergTableRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::LoadIcebergTableCredentialsResponse> {
            (*self.0.stub)
                .load_iceberg_table_credentials(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetIcebergTableRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [snapshots][crate::model::GetIcebergTableRequest::snapshots].
        pub fn set_snapshots<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.snapshots = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for LoadIcebergTableCredentials {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::update_iceberg_table][crate::client::IcebergCatalogService::update_iceberg_table] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::UpdateIcebergTable;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> UpdateIcebergTable {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct UpdateIcebergTable(RequestBuilder<crate::model::UpdateIcebergTableRequest>);

    impl UpdateIcebergTable {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::UpdateIcebergTableRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<api::model::HttpBody> {
            (*self.0.stub)
                .update_iceberg_table(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::UpdateIcebergTableRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [http_body][crate::model::UpdateIcebergTableRequest::http_body].
        ///
        /// This is a **required** field for requests.
        pub fn set_http_body<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<api::model::HttpBody>,
        {
            self.0.request.http_body = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [http_body][crate::model::UpdateIcebergTableRequest::http_body].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_http_body<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<api::model::HttpBody>,
        {
            self.0.request.http_body = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for UpdateIcebergTable {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::register_iceberg_table][crate::client::IcebergCatalogService::register_iceberg_table] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::RegisterIcebergTable;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> RegisterIcebergTable {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct RegisterIcebergTable(RequestBuilder<crate::model::RegisterIcebergTableRequest>);

    impl RegisterIcebergTable {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::RegisterIcebergTableRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<api::model::HttpBody> {
            (*self.0.stub)
                .register_iceberg_table(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::RegisterIcebergTableRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [name][crate::model::RegisterIcebergTableRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [metadata_location][crate::model::RegisterIcebergTableRequest::metadata_location].
        ///
        /// This is a **required** field for requests.
        pub fn set_metadata_location<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.metadata_location = v.into();
            self
        }

        /// Sets the value of [overwrite][crate::model::RegisterIcebergTableRequest::overwrite].
        pub fn set_overwrite<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.overwrite = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for RegisterIcebergTable {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::get_iceberg_catalog][crate::client::IcebergCatalogService::get_iceberg_catalog] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::GetIcebergCatalog;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetIcebergCatalog {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetIcebergCatalog(RequestBuilder<crate::model::GetIcebergCatalogRequest>);

    impl GetIcebergCatalog {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetIcebergCatalogRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::IcebergCatalog> {
            (*self.0.stub)
                .get_iceberg_catalog(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetIcebergCatalogRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetIcebergCatalog {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::list_iceberg_catalogs][crate::client::IcebergCatalogService::list_iceberg_catalogs] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::ListIcebergCatalogs;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListIcebergCatalogs {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListIcebergCatalogs(RequestBuilder<crate::model::ListIcebergCatalogsRequest>);

    impl ListIcebergCatalogs {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListIcebergCatalogsRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListIcebergCatalogsResponse> {
            (*self.0.stub)
                .list_iceberg_catalogs(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::ListIcebergCatalogsRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [view][crate::model::ListIcebergCatalogsRequest::view].
        pub fn set_view<T: Into<crate::model::list_iceberg_catalogs_request::CatalogView>>(
            mut self,
            v: T,
        ) -> Self {
            self.0.request.view = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListIcebergCatalogsRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListIcebergCatalogsRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListIcebergCatalogs {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::delete_iceberg_catalog][crate::client::IcebergCatalogService::delete_iceberg_catalog] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::DeleteIcebergCatalog;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteIcebergCatalog {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteIcebergCatalog(RequestBuilder<crate::model::DeleteIcebergCatalogRequest>);

    impl DeleteIcebergCatalog {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteIcebergCatalogRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_iceberg_catalog(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteIcebergCatalogRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteIcebergCatalog {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::update_iceberg_catalog][crate::client::IcebergCatalogService::update_iceberg_catalog] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::UpdateIcebergCatalog;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> UpdateIcebergCatalog {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct UpdateIcebergCatalog(RequestBuilder<crate::model::UpdateIcebergCatalogRequest>);

    impl UpdateIcebergCatalog {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::UpdateIcebergCatalogRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::IcebergCatalog> {
            (*self.0.stub)
                .update_iceberg_catalog(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [iceberg_catalog][crate::model::UpdateIcebergCatalogRequest::iceberg_catalog].
        ///
        /// This is a **required** field for requests.
        pub fn set_iceberg_catalog<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::IcebergCatalog>,
        {
            self.0.request.iceberg_catalog = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [iceberg_catalog][crate::model::UpdateIcebergCatalogRequest::iceberg_catalog].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_iceberg_catalog<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::IcebergCatalog>,
        {
            self.0.request.iceberg_catalog = v.map(|x| x.into());
            self
        }

        /// Sets the value of [update_mask][crate::model::UpdateIcebergCatalogRequest::update_mask].
        pub fn set_update_mask<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [update_mask][crate::model::UpdateIcebergCatalogRequest::update_mask].
        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for UpdateIcebergCatalog {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::create_iceberg_catalog][crate::client::IcebergCatalogService::create_iceberg_catalog] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::CreateIcebergCatalog;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> CreateIcebergCatalog {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct CreateIcebergCatalog(RequestBuilder<crate::model::CreateIcebergCatalogRequest>);

    impl CreateIcebergCatalog {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::CreateIcebergCatalogRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::IcebergCatalog> {
            (*self.0.stub)
                .create_iceberg_catalog(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::CreateIcebergCatalogRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [iceberg_catalog_id][crate::model::CreateIcebergCatalogRequest::iceberg_catalog_id].
        ///
        /// This is a **required** field for requests.
        pub fn set_iceberg_catalog_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.iceberg_catalog_id = v.into();
            self
        }

        /// Sets the value of [iceberg_catalog][crate::model::CreateIcebergCatalogRequest::iceberg_catalog].
        ///
        /// This is a **required** field for requests.
        pub fn set_iceberg_catalog<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::IcebergCatalog>,
        {
            self.0.request.iceberg_catalog = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [iceberg_catalog][crate::model::CreateIcebergCatalogRequest::iceberg_catalog].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_iceberg_catalog<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::IcebergCatalog>,
        {
            self.0.request.iceberg_catalog = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for CreateIcebergCatalog {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [IcebergCatalogService::failover_iceberg_catalog][crate::client::IcebergCatalogService::failover_iceberg_catalog] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_biglake_v1::builder;
    /// use builder::iceberg_catalog_service::FailoverIcebergCatalog;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> FailoverIcebergCatalog {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct FailoverIcebergCatalog(RequestBuilder<crate::model::FailoverIcebergCatalogRequest>);

    impl FailoverIcebergCatalog {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::IcebergCatalogService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::FailoverIcebergCatalogRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::FailoverIcebergCatalogResponse> {
            (*self.0.stub)
                .failover_iceberg_catalog(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::FailoverIcebergCatalogRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [primary_replica][crate::model::FailoverIcebergCatalogRequest::primary_replica].
        ///
        /// This is a **required** field for requests.
        pub fn set_primary_replica<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.primary_replica = v.into();
            self
        }

        /// Sets the value of [validate_only][crate::model::FailoverIcebergCatalogRequest::validate_only].
        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
            self.0.request.validate_only = v.into();
            self
        }

        /// Sets the value of [conditional_failover_replication_time][crate::model::FailoverIcebergCatalogRequest::conditional_failover_replication_time].
        pub fn set_conditional_failover_replication_time<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<wkt::Timestamp>,
        {
            self.0.request.conditional_failover_replication_time =
                std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [conditional_failover_replication_time][crate::model::FailoverIcebergCatalogRequest::conditional_failover_replication_time].
        pub fn set_or_clear_conditional_failover_replication_time<T>(
            mut self,
            v: std::option::Option<T>,
        ) -> Self
        where
            T: std::convert::Into<wkt::Timestamp>,
        {
            self.0.request.conditional_failover_replication_time = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for FailoverIcebergCatalog {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }
}
